module.exports = Behavior({

  data:{
    balance_text:"余额",
    integral_text:"积分"
  },
  attached: function(){
    this.setData({
      balance_text:wx.getStorageSync("balance"),
      integral_text:wx.getStorageSync("integral"),
    });
    this.initCustomField();
  },
  methods:{
    initCustomField(){},
    gotoPage(evt){
      let name = evt.currentTarget.dataset.name;
      let dataset = evt.currentTarget.dataset;
      let url=`/packageF/storeManagement/${name}/${name}?`;
      for(let key in dataset){
        if(key!='name'){
          url += `${key}=${dataset[key]}&`;
        }
      }

      wx.navigateTo({
        url,
      });
    }
  }
});